<?php

/**
 * @author Gideon Amissah<kuulmek@yahoo.com>
 */
class ReportController extends AppController {

    var $name = 'Report';
    var $helpers = array('Form', 'Html', 'Session');
    var $components = array('RequestHandler', 'Session');
    var $layout = 'report_layout';
    # Models to be used
    var $uses = array('Info','TempScore','ClientScore','BioData'
    );

    function index() {
        $title_for_layout = 'PACEM Report';
        $reportArray = $this->Info->find('all');
//        //pr($reportArray);
        
        $this->set(compact('title_for_layout'));
        
    }
    
    function ceoData() {
        $title_for_layout = 'PACEM Report : CEO/COO/GM';
        $reportArray = $this->Info->find('all', array(
            'conditions' => array(
                'Info.position' => 'CEO/COO/GM'
            ),
             'contain' => array(
                'ClientScore'
            )));
          foreach($reportArray as $reportArrays ){
              $reportData = $reportArrays;
          }
        
        $this->set(compact('title_for_layout','reportData'));
        
    }
    
    function clientStats2012() {
        $title_for_layout = 'PACEM Report : Clent Statistics';
        $reportArray = $this->Info->find('all');
//        //pr($reportArray);
        
        $this->set(compact('title_for_layout'));
        
    }
    
}
?>